<?php
include '../connect/common_start.php';

if (isset($_REQUEST['mem_id'])) {
	$mem_id=$_REQUEST['mem_id'];
	if (isset($_REQUEST['mem_id_friend'])) {
		$mem_id_friend=$_REQUEST['mem_id_friend'];
		$sql="INSERT INTO `friend` (`mem_id`, `mem_friend`, `status`, `create_date`) VALUES ('$mem_id', '$mem_id_friend', '1', NOW()), ('$mem_id_friend', '$mem_id', '1', NOW())";
		$result=mysql_query($sql);
		echo mysql_affected_rows();
	}
}

include '../connect/common_end.php';
?>